<?php
include(dirname(__FILE__)."/inc/taobaoCom.php");
include(dirname(__FILE__)."/inc/template.class.php");
$class = new taobaoCom();
$templateRoot = dirname(__FILE__)."/templates/";
$tpl = new Template($templateRoot);
$iids=filter_input(INPUT_GET,"iid");
$iidArray = explode(",",$iids);
foreach ($iidArray as $iid)
{
	$tmp = explode("-",$iid);
	$itemInfo=$class->getItemInfo($tmp[0],$tmp[1]);
	$taokeInfo = $class->getTaokeProductInfo($iid);
	$traderates = $class->getTraderates($tmp[1]);
	if ($taokeInfo[0]['click_url'])
	{
		$itemInfo[0]['detail_url'] = $taokeInfo[0]['click_url'];
	}
	$itemsInfo[]=array_merge($itemInfo[0],$traderates);
}
$tpl->assign("itemsInfo",$itemsInfo);
$tpl->display("comItems.tpl.php");